Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix(fuse): fix fat pointer metadata #1112

Merged
merged 1 commit into from
Mar 26, 2024
Merged

Conversation

mkroening
Copy link
Member

Closes #1110.

@mkroening mkroening self-assigned this Mar 26, 2024
@mkroening
Copy link
Member Author

CC: @cagatay-y

@mkroening mkroening enabled auto-merge March 26, 2024 10:55
@mkroening mkroening added this pull request to the merge queue Mar 26, 2024
Merged via the queue into hermit-os:main with commit c2f023f Mar 26, 2024
13 checks passed
@mkroening mkroening deleted the fuse-fix branch March 26, 2024 12:29
@cagatay-y
Copy link
Contributor

I am confused about how this works. When I extract the expression with slice_from_raw_parts_mut into a variable, rust-analyzer reports the type as *mut [u8]. len is not the length of the entire struct, rather the payload, so the slice we create here does not cover the whole struct. I validated this by checking the length of the pointed slice.

The reason I originally used 0 as the slice length was because that was how it was in the previous version of the code, but I think reverting 93fc6cb and using ptr_metadata here may be worth the unstable feature. I included a commit with the reversion in my PR (#1113) for #1111, but I can remove it if you prefer.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Panic in FUSE
2 participants